﻿using Bot.Domain;
using Bot.Domain.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bot.Domain.BotImport
{
    public class BotImportDataQueue
    {
        public EnumOperationStatus ProcessState { get; set; }
        public EnumImportHandleStatus Status { get; set; }
        public string FileName { get; set; }
        public BotImportDataEx BotImportData { get; set; }
        public string Json { get; set; }
        public Queue<dynamic> ImportDataQueue { get; set; }
        public int SiteId { get; set; }
        public Guid BotId { get; set; }
        public string BotName { get; set; }
        public decimal VersionId { get; set; }
        public string AppId { get; set; }
        public IList<string> ErrorMessages { get; set; }
        public string OperationName { get; set; }
        public int ProcessId { get; set; }
        public int ErrorCode { get; set; }
        public EnumOperateType OperateType { get; set; }
        public Dictionary<string,dynamic> ObjectMaps { get; set; }

        public BotImportDataQueue()
        {
            ImportDataQueue = new Queue<dynamic>();
            Status = EnumImportHandleStatus.Wait;
            ProcessState = EnumOperationStatus.Occupy;
            ErrorMessages = new List<string>();
            ObjectMaps = new Dictionary<string, dynamic>();
        }
        public BotImportDataQueue(BotImportDataQueue botImportDataQueue)
        {
            this.ProcessState = botImportDataQueue.ProcessState;
            this.Status = botImportDataQueue.Status;
            this.FileName = botImportDataQueue.FileName;
            this.BotImportData = botImportDataQueue.BotImportData;
            this.Json = botImportDataQueue.Json;
            this.ImportDataQueue = botImportDataQueue.ImportDataQueue;
            this.SiteId = botImportDataQueue.SiteId;
            this.BotId = botImportDataQueue.BotId;
            this.BotName = botImportDataQueue.BotName;
            this.VersionId = botImportDataQueue.VersionId;
            this.AppId = botImportDataQueue.AppId;
            this.ErrorMessages = botImportDataQueue.ErrorMessages;
            this.OperationName = botImportDataQueue.OperationName;
            this.ProcessId = botImportDataQueue.ProcessId;
            this.ErrorCode = botImportDataQueue.ErrorCode;
            this.OperateType = botImportDataQueue.OperateType;
            this.ObjectMaps = botImportDataQueue.ObjectMaps;
        }
    }
}
